package com.ad_hccm.dao.VitalSigns;

import com.ad_hccm.domain.VitalSigns.VitalSigns;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * TODO 生命体征Dao
 */
@Mapper
public interface VitalSignsDao {
    @Insert("insert into vital_signs value(#{id}, #{temperature}, #{breathing}, #{heartRate}, #{bloodPressure})")
    public boolean save(VitalSigns vitalSigns);

    @Update("update vital_signs set temperature = #{temperature}, breathing = #{breathing}, heartRate = #{heartRate}, bloodPressure = #{bloodPressure} where id=#{id}")
    public boolean update(VitalSigns vitalSigns);

    @Select("select * from vital_signs where id=#{id}")
    public VitalSigns getById(String id);

    @Select("select * from vital_signs")
    public List<VitalSigns> getAll();
}
